import MailSystem.Connection;
import MailSystem.ConsoleInterface;
import MailSystem.MailSystem;
import MailSystem.Telephone;
import MailSystem.WindowInterface;


/**
 * This program tests the mail system. A single phone communicates with the
 * program through System.in/System.out.
 */
public class MailSystemTester {
	public static void main(String[] args) {		
		MailSystem system = new MailSystem(MAILBOX_COUNT);
		
		Telephone console1 = new ConsoleInterface();
		Telephone console2 = new WindowInterface();
		
		Connection c = new Connection(system);
		
		c.addPhone(console1);
		c.addPhone(console2);
		
		console2.run(c);
		console1.run(c);
	}

	private static final int MAILBOX_COUNT = 20;
}
